package com.example.b_308.myapplication.view;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.b_308.myapplication.comment.view.TitleBar;
import com.example.b_308.myapplication.controller.AccountController;
import com.example.b_308.myapplication.view.account.IAccountView;
import com.example.b_308.myapplication.view.base.BaseActivity;
import com.example.b_308.myapplication.R;
/**
 * Created by B-308 on 2017/11/22.
 */

public class PersonalCenterActivity extends BaseActivity implements View.OnClickListener, IAccountView {
    Button but_user_information,but_reservation_registration,but_my_interrogation,but_patient_evaluation;
    ImageView iv_return;
    AccountController accountController;
    TitleBar titleBar;
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_personal_center);
        initView();
        initDate();
        initListener();

    }

    private void initListener() {
        but_my_interrogation.setOnClickListener(this);
        but_patient_evaluation.setOnClickListener(this);
        but_reservation_registration.setOnClickListener(this);
        but_user_information.setOnClickListener(this);
        iv_return.setOnClickListener(this);
    }

    private void initDate() {
        accountController= new AccountController(this);
    }


    private void initView() {
        but_user_information= findView(R.id.but_user_information);
        but_patient_evaluation= findView(R.id.but_patient_evaluation);
        but_reservation_registration = findView(R.id.but_reservation_registration);
        but_my_interrogation = findView(R.id.but_my_interrogation);
        iv_return = findView(R.id.iv_return);
        titleBar =getTitleBar();
//        titleBar.setVisibility(View.GONE);
//        titleBar.getIv_return().setVisibility(View.GONE);
        titleBar.setTitle(R.string.geren);
    }



    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.but_user_information:
                tent2(Account_informationActivity.class);
                break;
            case R.id.but_my_interrogation:
                tent2(My_interrogationActivity.class);
                break;
            case R.id.but_reservation_registration:
                tent2(My_reservation_for_registrationActivity.class);
                break;
            case R.id.but_patient_evaluation:
                tent2(Patient_evaluationActivity.class);
                break;
            case R.id.iv_return:
                tent2(LoginActivity.class);
                break;
        }
    }

    @Override
    public void getAccountSuccess() {

    }
}

